import React from 'react';
import {Navigate} from "react-router-dom";

function AuthComponent(props) {
    // if(!localStorage.getItem("token")) return <Navigate to={"/"}/>
    // return props.children;

    return localStorage.getItem("token")?props.children:<Navigate to={"/"}/>
}

export default AuthComponent;